import G6 from '@antv/g6';

export default {
  nodes: [
    {
      id: 'T10001',
      type: 'rect',
      x: 400,
      y: 50,
      anchorPoints: [
        [0.5, 1]
      ],
      label: '开始',
      style: {
        width: 100,
        height: 50,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      },
      nodeStateStyles: {
        hover: {
          fill: 'black',
        },
      },
    },
    {
      id: 'T10002',
      type: 'rect',
      x: 400,
      y: 150,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '设计方案\n1.0设计方案原资料',
      style: {
        width: 200,
        height: 75,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10003',
      type: 'rect',
      x: 400,
      y: 275,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1],
        [0, 0.5]
      ],
      label: '2.0负责图纸修改\n核对清单数量',
      style: {
        width: 200,
        height: 75,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#990000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10004',
      type: 'rect',
      x: 400,
      y: 375,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '3.0负责审核',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#FF0000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#FF0000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10004.5',
      type: 'diamond',
      x: 400,
      y: 450,
      size: [100, 50],
      anchorPoints: [
        [0.5, 0],
        [0.5, 1],
        [0, 0.5]
      ],
      label: '通过',
      style: {
        fill: 'white',
        stroke: '#FF0000',
        lineWidth: 3,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#FF0000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10005',
      type: 'rect',
      x: 400,
      y: 550,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '4.0负责预算',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10006',
      type: 'rect',
      x: 400,
      y: 650,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '5.0负责参数表\n含品牌型号',
      style: {
        width: 200,
        height: 75,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10007',
      type: 'rect',
      x: 400,
      y: 750,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '6.0负责实施方案',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10008',
      type: 'rect',
      x: 150,
      y: 875,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '7.0图纸导PDF',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10009',
      type: 'rect',
      x: 400,
      y: 875,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '8.0预算导PDF',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10010',
      type: 'rect',
      x: 650,
      y: 875,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '9.0参数表导PDF',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10011',
      type: 'rect',
      x: 400,
      y: 975,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '10.0合并完整方案',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: '#660000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10011.5',
      type: 'diamond',
      x: 400,
      y: 1050,
      size: [100, 50],
      anchorPoints: [
        [0.5, 0],
        [0.5, 1],
        [1, 0.5]
      ],
      label: '打印',
      style: {
        fill: 'white',
        stroke: '#FF0000',
        lineWidth: 3,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#FF0000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10012',
      type: 'rect',
      x: 400,
      y: 1175,
      anchorPoints: [
        [0.5, 0],
        [0.5, 1]
      ],
      label: '11.0打印方案\n合并后的PDF:\n沃的沃OA打印\n华维打印',
      style: {
        width: 200,
        height: 125,
        fill: 'white',
        stroke: '#FF0000',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: '#660000',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      }
    },
    {
      id: 'T10013',
      type: 'rect',
      x: 400,
      y: 1300,
      anchorPoints: [
        [0.5, 0],
        [1, 0.5]
      ],
      label: '结束',
      style: {
        width: 200,
        height: 50,
        fill: 'white',
        stroke: 'black',
        lineWidth: 3,
        radius: 10,
        cursor: 'pointer'
      },
      labelCfg: {
        style: {
          fill: 'black',
          fontSize: 20,
          fontWeight: 'bold',
          cursor: 'pointer'
        }
      },
    },
  ],
  edges: [
    {
      source: 'T10001',
      target: 'T10002',
    },
    {
      source: 'T10002',
      target: 'T10003',
    },
    {
      source: 'T10003',
      target: 'T10004',
    },
    {
      source: 'T10004',
      target: 'T10004.5',
    },
    {
      source: 'T10004.5',
      target: 'T10005',
      sourceAnchor: 0,
      targetAnchor: 0,
      label: '是',
      labelCfg: {
        refX: 20
      }
    },
    {
      source: 'T10004.5',
      target: 'T10003',
      type: 'polyline',
      sourceAnchor: 2,
      targetAnchor: 2,
      label: '否'
    },
    {
      source: 'T10005',
      target: 'T10006',
    },
    {
      source: 'T10006',
      target: 'T10007',
    },
    // 并行开始
    {
      source: 'T10007',
      target: 'T10008',
      type: 'polyline',
    },
    {
      source: 'T10007',
      target: 'T10009',
      type: 'polyline',
    },
    {
      source: 'T10007',
      target: 'T10010',
      type: 'polyline',
    },
    // 并行结束
    {
      source: 'T10008',
      target: 'T10011',
      type: 'polyline',
    },
    {
      source: 'T10009',
      target: 'T10011',
      type: 'polyline',
    },
    {
      source: 'T10010',
      target: 'T10011',
      type: 'polyline',
    },
    //
    {
      source: 'T10011',
      target: 'T10011.5',
    },
    {
      source: 'T10011.5',
      target: 'T10012',
      label: '是',
      labelCfg: {
        refX: 20
      },
      sourceAnchor: 0,
      targetAnchor: 0,
    },
    {
      source: 'T10011.5',
      target: 'T10013',
      type: 'polyline',
      sourceAnchor: 2,
      targetAnchor: 1,
      label: '否'
    },
    {
      source: 'T10012',
      target: 'T10013',
    },
  ]
}